package cn.edu.ldu.views.main;

import lombok.Data;

import javax.swing.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;

public class ListModel<E> extends DefaultListModel<E> {

    private List<Long> userIds;

    public ListModel(){
        super();
        userIds = new ArrayList<>();
    }

    public void addElement(E element, Long userId) {
        addElement(element);
        userIds.add(userId);
    }

    public Long getUserIds(int i) {
        return userIds.get(i);
    }

    public void setUserIds(List<Long> userIds) {
        this.userIds = userIds;
    }
}
